package com.aspose.cells;

class zbgr extends zck {
   zbgr(zn var1, float var2, float var3, zbkr var4) {
      super(var1, var2, var3, var4);
   }

   com.aspose.cells.b.a.b.a.ze a(com.aspose.cells.b.a.b.zq var1) {
      float var2 = 0.0F;
      float var3 = 0.0F;
      com.aspose.cells.b.a.b.a.ze var4 = new com.aspose.cells.b.a.b.a.ze();
      com.aspose.cells.b.a.b.zo[] var5 = new com.aspose.cells.b.a.b.zo[6];
      if (this.e.m != null) {
         if (this.e.m.a.size() > 0) {
            var2 = Math.min(var1.h(), var1.i()) * com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F;
            var3 = Math.min(var1.h(), var1.i()) * com.aspose.cells.b.a.ze.a(this.e.m.a.get(1)) / 100000.0F;
         } else {
            var2 = Math.min(var1.h(), var1.i()) * 0.5F;
            var3 = Math.min(var1.h(), var1.i()) * 0.5F;
         }
      } else {
         var2 = Math.min(var1.h(), var1.i()) * 0.5F;
         var3 = Math.min(var1.h(), var1.i()) * 0.5F;
      }

      if (var2 <= 0.0F && var3 <= 0.0F) {
         var5[0] = new com.aspose.cells.b.a.b.zo(this.g, this.h);
         var5[1] = new com.aspose.cells.b.a.b.zo(this.g, var1.i() + this.h);
         var5[2] = new com.aspose.cells.b.a.b.zo(var1.h() + this.g, var1.i() + this.h);
         var4.a(var5[0], var5[1]);
         var4.a(var5[1], var5[2]);
         return var4;
      } else {
         switch(this.e.b) {
         case 1:
            var5[0] = new com.aspose.cells.b.a.b.zo(this.g, this.h);
            var5[1] = new com.aspose.cells.b.a.b.zo(var3 + this.g, this.h);
            var5[2] = new com.aspose.cells.b.a.b.zo(var3 + this.g, var1.i() - var2 + this.h);
            var5[3] = new com.aspose.cells.b.a.b.zo(var1.h() + this.g, var1.i() - var2 + this.h);
            var5[4] = new com.aspose.cells.b.a.b.zo(var1.h() + this.g, var1.i() + this.h);
            var5[5] = new com.aspose.cells.b.a.b.zo(this.g, var1.i() + this.h);
            break;
         case 2:
            var5[0] = new com.aspose.cells.b.a.b.zo(this.g, this.h);
            var5[1] = new com.aspose.cells.b.a.b.zo(var1.h() + this.g, this.h);
            var5[2] = new com.aspose.cells.b.a.b.zo(var1.h() + this.g, var2 + this.h);
            var5[3] = new com.aspose.cells.b.a.b.zo(var3 + this.g, var2 + this.h);
            var5[4] = new com.aspose.cells.b.a.b.zo(var3 + this.g, var1.i() + this.h);
            var5[5] = new com.aspose.cells.b.a.b.zo(this.g, var1.i() + this.h);
            break;
         case 3:
            var5[0] = new com.aspose.cells.b.a.b.zo(this.g, this.h);
            var5[1] = new com.aspose.cells.b.a.b.zo(var1.h() + this.g, this.h);
            var5[2] = new com.aspose.cells.b.a.b.zo(var1.h() + this.g, var1.i() + this.h);
            var5[3] = new com.aspose.cells.b.a.b.zo(var1.h() - var3 + this.g, var1.i() + this.h);
            var5[4] = new com.aspose.cells.b.a.b.zo(var1.h() - var3 + this.g, var2 + this.h);
            var5[5] = new com.aspose.cells.b.a.b.zo(this.g, var2 + this.h);
            break;
         case 4:
            var5[0] = new com.aspose.cells.b.a.b.zo(var1.h() - var3 + this.g, this.h);
            var5[1] = new com.aspose.cells.b.a.b.zo(var1.h() + this.g, this.h);
            var5[2] = new com.aspose.cells.b.a.b.zo(var1.h() + this.g, var1.i() + this.h);
            var5[3] = new com.aspose.cells.b.a.b.zo(this.g, var1.i() + this.h);
            var5[4] = new com.aspose.cells.b.a.b.zo(this.g, var1.i() - var2 + this.h);
            var5[5] = new com.aspose.cells.b.a.b.zo(var1.h() - var3 + this.g, var1.i() - var2 + this.h);
         }

         var4.a(var5[0], var5[1]);
         var4.a(var5[1], var5[2]);
         var4.a(var5[2], var5[3]);
         var4.a(var5[3], var5[4]);
         var4.a(var5[5], var5[0]);
         var4.i();
         return var4;
      }
   }
}
